import api from './index'
// // axios
import request from '@/utils/request'
// import {interfaceUtils} from '../model/interface'

// 登录
export function toLogin(data) {
  return request({
    url: api.Login,
    method: 'post',
    
    data
  })
}

// 发送短信
export function sendSms(data) {
  return request({
    url: api.SendSMS,
    method: 'get',
    params:data
  })
}

//注册 
export function toRegister(data) {
  return request({
    url: api.Register,
    method: 'post',
   
    data
  })
}

// 修改密码
export function updatepassword(data){
  return request({
    url: api.Updatepassword,
    method: 'post',
   
    data
  })
}

//三级地址 选择
export function getArea(data){
  return request({
    url: api.GetArea,
    method: 'post',
  
    data
  })
}

//获取地址列表

export function getAddressList(data){
  return request({
    url: api.GetAddressList,
    method: 'post',
   
    data
  })
}

//新增客户地址 
export function addAddress(data){
  return request({
    url: api.AddAddress,
    method: 'post',
  
    data
  })
}

//删除 客户地址
export function deleteAddress(data){
  return request({
    url: api.DeleteAddress,
    method: 'post',
   
    data
  })
}

//获取时间 等系统数据

export function getSelectValue(data){
  return request({
    url: api.GetSelectV,
    method: 'post',
   
    data
  })
}

//获取消费类型

export function getDeliveryTypeList(){
  return request({
    url: api.GetDeliveryTypeList,
    method: 'get',
   
    
  })
}



//计算运费
export function toAntcipatedFreight(data){
  return request({
    url: api.AntcipatedFreight,
    method: 'post',
  
    data
  })
}


//提交收件任务
export function toSubmitReceivePiece(data){
  return request({
    url: api.SubmitReceivePiece,
    method: 'post',
  
    data
  })
}


//根据客户id和运单状态查询客户收件任务
export function toGetReceivePieceByConsumerIdAndtatus(data){
  return request({
    url: api.GetReceivePieceByConsumerIdAndtatus,
    method: 'post',
  
    data
  })
}
//根据运单号 查询详情
export function toQueryWaybillTraceAndWaybill(data){
  return request({
    url: api.QueryWaybillTraceAndWaybill,
    method: 'post',
  
    data
  })
}

//获取月结验证码信息

export function toGetVerificationCode(data){
  return request({
    url: api.GetVerificationCode,
    method: 'get',
 
    params:data,
   
  })
}







// // 用户信息 post 方法
// export function getUserInfo(data) {
//   return request({
//     url: api.UserInfo,
//     method: 'post',
//     data,
//     hideloading: true
//   })
// }

// // 用户名称 get 方法
// export function getUserName(params) {
//   return request({
//     url: api.UserName,
//     method: 'get',
//     params,
//     hideloading: true
//   })
// }
